package plugins.system;

import plugins.Plugin;
import main.Main;
import main.Room;
import main.User;

public class JumpRoomPlugin extends Plugin {

	@Override
	public void execute(Room room, User user, String command, String text) {
		Room to = Main.main.getRoomByName(text);
		if (to == null) {
			user.dispatch("No such room");
			return;
		}
		user.jump(to);
		user.dispatch("Jumped to " + to.getName());
	}
}
